<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位</title>
    <style type="text/css">
#div1{
    width:500px;
    height: 500px;
    background-color: #4E6B33;
}
#div2{
    width:100px;
    height: 100px;
    background-color:#0382AD;
    /*相对定位*/
    position: relative;
    left: 50px;
}
#div3{
    width: 100px;
    height: 100px;
    background-color: #EE0000;
}
    </style>
</head>
<body>
<div id="div1">
    <div id="div2">
    </div>
</div>
<div id="div3"></div>
</body>
</html>